package com.week2.day03;

import java.util.Arrays;

public class Demo01 {
    public static void main(String[] args) {
        Dog[] dogs = new Dog[3];
        dogs[0] = new Dog("a",6);
        dogs[1] = new Dog("fff",9);
        dogs[2] = new Dog("zz",3);
        Arrays.sort(dogs);
        System.out.println(dogs[0].toString());
        System.out.println(dogs[1].toString());
        System.out.println(dogs[2].toString());
        Swimable dog = new Dog("mydog",1);
        dog.swim();
    }
}
